import React from 'react';
import { Pagination } from 'antd';

const PaginationComponent = ({ current, pageSize, total, onChange }) => {
  const handleChange = (page, size) => {
    onChange(page, size);
  };

  return (
    <Pagination
      current={current}
      pageSize={pageSize}
      total={total}
      onChange={handleChange}
      onShowSizeChange={handleChange}
      showSizeChanger
      showQuickJumper
      showTotal={(total, range) => 
        `第 ${range[0]}-${range[1]} 条，共 ${total} 条`
      }
      pageSizeOptions={['6', '12', '24', '48']}
    />
  );
};

export default PaginationComponent;